\(\int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx\) [336]
Optimal result
Integrand size = 31, antiderivative size = 418 \[
\int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\frac {(A b-4 a B) \text {arctanh}(\sin (c+d x))}{b^5 d}-\frac {a \left (2 a^6 A b-7 a^4 A b^3+8 a^2 A b^5-8 A b^7-8 a^7 B+28 a^5 b^2 B-35 a^3 b^4 B+20 a b^6 B\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} b^5 (a+b)^{7/2} d}-\frac {\left (3 a^3 A b-8 a A b^3-12 a^4 B+23 a^2 b^2 B-6 b^4 B\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}+\frac {a (A b-a B) \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac {a \left (a^2 A b-6 A b^3-4 a^3 B+9 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}-\frac {a^2 \left (a^4 A b-2 a^2 A b^3+6 A b^5-4 a^5 B+11 a^3 b^2 B-12 a b^4 B\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}
\]
[Out]
(A*b-4*B*a)*arctanh(sin(d*x+c))/b^5/d-a*(2*A*a^6*b-7*A*a^4*b^3+8*A*a^2*b^5-8*A*b^7-8*B*a^7+28*B*a^5*b^2-35*B*a
^3*b^4+20*B*a*b^6)*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2))/(a-b)^(7/2)/b^5/(a+b)^(7/2)/d-1/6*(3*A*
a^3*b-8*A*a*b^3-12*B*a^4+23*B*a^2*b^2-6*B*b^4)*tan(d*x+c)/b^4/(a^2-b^2)^2/d+1/3*a*(A*b-B*a)*sec(d*x+c)^3*tan(d
*x+c)/b/(a^2-b^2)/d/(a+b*sec(d*x+c))^3+1/6*a*(A*a^2*b-6*A*b^3-4*B*a^3+9*B*a*b^2)*sec(d*x+c)^2*tan(d*x+c)/b^2/(
a^2-b^2)^2/d/(a+b*sec(d*x+c))^2-1/2*a^2*(A*a^4*b-2*A*a^2*b^3+6*A*b^5-4*B*a^5+11*B*a^3*b^2-12*B*a*b^4)*tan(d*x+
c)/b^4/(a^2-b^2)^3/d/(a+b*sec(d*x+c))
Rubi [A] (verified)
Time = 5.60 (sec) , antiderivative size = 418, normalized size of antiderivative = 1.00, number of
steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.290, Rules used = {4114, 4183, 4175, 4167, 4083,
3855, 3916, 2738, 214} \[
\int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\frac {a (A b-a B) \tan (c+d x) \sec ^3(c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}+\frac {a \left (-4 a^3 B+a^2 A b+9 a b^2 B-6 A b^3\right ) \tan (c+d x) \sec ^2(c+d x)}{6 b^2 d \left (a^2-b^2\right )^2 (a+b \sec (c+d x))^2}-\frac {\left (-12 a^4 B+3 a^3 A b+23 a^2 b^2 B-8 a A b^3-6 b^4 B\right ) \tan (c+d x)}{6 b^4 d \left (a^2-b^2\right )^2}-\frac {a^2 \left (-4 a^5 B+a^4 A b+11 a^3 b^2 B-2 a^2 A b^3-12 a b^4 B+6 A b^5\right ) \tan (c+d x)}{2 b^4 d \left (a^2-b^2\right )^3 (a+b \sec (c+d x))}-\frac {a \left (-8 a^7 B+2 a^6 A b+28 a^5 b^2 B-7 a^4 A b^3-35 a^3 b^4 B+8 a^2 A b^5+20 a b^6 B-8 A b^7\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{b^5 d (a-b)^{7/2} (a+b)^{7/2}}+\frac {(A b-4 a B) \text {arctanh}(\sin (c+d x))}{b^5 d}
\]
[In]
Int[(Sec[c + d*x]^5*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^4,x]
[Out]
((A*b - 4*a*B)*ArcTanh[Sin[c + d*x]])/(b^5*d) - (a*(2*a^6*A*b - 7*a^4*A*b^3 + 8*a^2*A*b^5 - 8*A*b^7 - 8*a^7*B
+ 28*a^5*b^2*B - 35*a^3*b^4*B + 20*a*b^6*B)*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/((a - b)^(7/2
)*b^5*(a + b)^(7/2)*d) - ((3*a^3*A*b - 8*a*A*b^3 - 12*a^4*B + 23*a^2*b^2*B - 6*b^4*B)*Tan[c + d*x])/(6*b^4*(a^
2 - b^2)^2*d) + (a*(A*b - a*B)*Sec[c + d*x]^3*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) + (a*(a
^2*A*b - 6*A*b^3 - 4*a^3*B + 9*a*b^2*B)*Sec[c + d*x]^2*Tan[c + d*x])/(6*b^2*(a^2 - b^2)^2*d*(a + b*Sec[c + d*x
])^2) - (a^2*(a^4*A*b - 2*a^2*A*b^3 + 6*A*b^5 - 4*a^5*B + 11*a^3*b^2*B - 12*a*b^4*B)*Tan[c + d*x])/(2*b^4*(a^2
- b^2)^3*d*(a + b*Sec[c + d*x]))
Rule 214
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]
Rule 2738
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = FreeFactors[Tan[(c + d*x)/2], x
]}, Dist[2*(e/d), Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}
, x] && NeQ[a^2 - b^2, 0]
Rule 3855
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Rule 3916
Int[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[1/b, Int[1/(1 + (a/b)*Si
n[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Rule 4083
Int[(csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)))/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x
_Symbol] :> Dist[B/b, Int[Csc[e + f*x], x], x] + Dist[(A*b - a*B)/b, Int[Csc[e + f*x]/(a + b*Csc[e + f*x]), x]
, x] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0]
Rule 4114
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*
(B_.) + (A_)), x_Symbol] :> Simp[a*d^2*(A*b - a*B)*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*((d*Csc[e + f*x])
^(n - 2)/(b*f*(m + 1)*(a^2 - b^2))), x] - Dist[d/(b*(m + 1)*(a^2 - b^2)), Int[(a + b*Csc[e + f*x])^(m + 1)*(d*
Csc[e + f*x])^(n - 2)*Simp[a*d*(A*b - a*B)*(n - 2) + b*d*(A*b - a*B)*(m + 1)*Csc[e + f*x] - (a*A*b*d*(m + n) -
d*B*(a^2*(n - 1) + b^2*(m + 1)))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B}, x] && NeQ[A*b - a
*B, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && GtQ[n, 1]
Rule 4167
Int[csc[(e_.) + (f_.)*(x_)]*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_
.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m
+ 2))), x] + Dist[1/(b*(m + 2)), Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^m*Simp[b*A*(m + 2) + b*C*(m + 1) + (b*
B*(m + 2) - a*C)*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Rule 4175
Int[csc[(e_.) + (f_.)*(x_)]^2*((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(
e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[a*(A*b^2 - a*b*B + a^2*C)*Cot[e + f*x]*((a + b*Csc[e
+ f*x])^(m + 1)/(b^2*f*(m + 1)*(a^2 - b^2))), x] - Dist[1/(b^2*(m + 1)*(a^2 - b^2)), Int[Csc[e + f*x]*(a + b*C
sc[e + f*x])^(m + 1)*Simp[b*(m + 1)*((-a)*(b*B - a*C) + A*b^2) + (b*B*(a^2 + b^2*(m + 1)) - a*(A*b^2*(m + 2) +
C*(a^2 + b^2*(m + 1))))*Csc[e + f*x] - b*C*(m + 1)*(a^2 - b^2)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, e,
f, A, B, C}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1]
Rule 4183
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^
(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_), x_Symbol] :> Simp[(-d)*(A*b^2 - a*b*B + a^2*C)*Cot[e + f*x]*
(a + b*Csc[e + f*x])^(m + 1)*((d*Csc[e + f*x])^(n - 1)/(b*f*(a^2 - b^2)*(m + 1))), x] + Dist[d/(b*(a^2 - b^2)*
(m + 1)), Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^(n - 1)*Simp[A*b^2*(n - 1) - a*(b*B - a*C)*(n - 1)
+ b*(a*A - b*B + a*C)*(m + 1)*Csc[e + f*x] - (b*(A*b - a*B)*(m + n + 1) + C*(a^2*n + b^2*(m + 1)))*Csc[e + f*
x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, A, B, C}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && GtQ[n, 0]
Rubi steps \begin{align*}
\text {integral}& = \frac {a (A b-a B) \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac {\int \frac {\sec ^3(c+d x) \left (3 a (A b-a B)-3 b (A b-a B) \sec (c+d x)-\left (a A b-4 a^2 B+3 b^2 B\right ) \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^3} \, dx}{3 b \left (a^2-b^2\right )} \\ & = \frac {a (A b-a B) \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac {a \left (a^2 A b-6 A b^3-4 a^3 B+9 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}-\frac {\int \frac {\sec ^2(c+d x) \left (-2 a \left (a^2 A b-6 A b^3-4 a^3 B+9 a b^2 B\right )-2 b \left (2 a^2 A b+3 A b^3+a^3 B-6 a b^2 B\right ) \sec (c+d x)+\left (3 a^3 A b-8 a A b^3-12 a^4 B+23 a^2 b^2 B-6 b^4 B\right ) \sec ^2(c+d x)\right )}{(a+b \sec (c+d x))^2} \, dx}{6 b^2 \left (a^2-b^2\right )^2} \\ & = \frac {a (A b-a B) \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac {a \left (a^2 A b-6 A b^3-4 a^3 B+9 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}-\frac {a^2 \left (a^4 A b-2 a^2 A b^3+6 A b^5-4 a^5 B+11 a^3 b^2 B-12 a b^4 B\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}-\frac {\int \frac {\sec (c+d x) \left (-3 a b \left (a^4 A b-2 a^2 A b^3+6 A b^5-4 a^5 B+11 a^3 b^2 B-12 a b^4 B\right )-\left (a^2-b^2\right ) \left (3 a^4 A b-4 a^2 A b^3+6 A b^5-12 a^5 B+25 a^3 b^2 B-18 a b^4 B\right ) \sec (c+d x)+b \left (a^2-b^2\right ) \left (3 a^3 A b-8 a A b^3-12 a^4 B+23 a^2 b^2 B-6 b^4 B\right ) \sec ^2(c+d x)\right )}{a+b \sec (c+d x)} \, dx}{6 b^4 \left (a^2-b^2\right )^3} \\ & = -\frac {\left (3 a^3 A b-8 a A b^3-12 a^4 B+23 a^2 b^2 B-6 b^4 B\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}+\frac {a (A b-a B) \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac {a \left (a^2 A b-6 A b^3-4 a^3 B+9 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}-\frac {a^2 \left (a^4 A b-2 a^2 A b^3+6 A b^5-4 a^5 B+11 a^3 b^2 B-12 a b^4 B\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}-\frac {\int \frac {\sec (c+d x) \left (-3 a b^2 \left (a^4 A b-2 a^2 A b^3+6 A b^5-4 a^5 B+11 a^3 b^2 B-12 a b^4 B\right )-6 b \left (a^2-b^2\right )^3 (A b-4 a B) \sec (c+d x)\right )}{a+b \sec (c+d x)} \, dx}{6 b^5 \left (a^2-b^2\right )^3} \\ & = -\frac {\left (3 a^3 A b-8 a A b^3-12 a^4 B+23 a^2 b^2 B-6 b^4 B\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}+\frac {a (A b-a B) \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac {a \left (a^2 A b-6 A b^3-4 a^3 B+9 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}-\frac {a^2 \left (a^4 A b-2 a^2 A b^3+6 A b^5-4 a^5 B+11 a^3 b^2 B-12 a b^4 B\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}+\frac {(A b-4 a B) \int \sec (c+d x) \, dx}{b^5}-\frac {\left (a \left (2 a^6 A b-7 a^4 A b^3+8 a^2 A b^5-8 A b^7-8 a^7 B+28 a^5 b^2 B-35 a^3 b^4 B+20 a b^6 B\right )\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)} \, dx}{2 b^5 \left (a^2-b^2\right )^3} \\ & = \frac {(A b-4 a B) \text {arctanh}(\sin (c+d x))}{b^5 d}-\frac {\left (3 a^3 A b-8 a A b^3-12 a^4 B+23 a^2 b^2 B-6 b^4 B\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}+\frac {a (A b-a B) \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac {a \left (a^2 A b-6 A b^3-4 a^3 B+9 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}-\frac {a^2 \left (a^4 A b-2 a^2 A b^3+6 A b^5-4 a^5 B+11 a^3 b^2 B-12 a b^4 B\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}-\frac {\left (a \left (2 a^6 A b-7 a^4 A b^3+8 a^2 A b^5-8 A b^7-8 a^7 B+28 a^5 b^2 B-35 a^3 b^4 B+20 a b^6 B\right )\right ) \int \frac {1}{1+\frac {a \cos (c+d x)}{b}} \, dx}{2 b^6 \left (a^2-b^2\right )^3} \\ & = \frac {(A b-4 a B) \text {arctanh}(\sin (c+d x))}{b^5 d}-\frac {\left (3 a^3 A b-8 a A b^3-12 a^4 B+23 a^2 b^2 B-6 b^4 B\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}+\frac {a (A b-a B) \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac {a \left (a^2 A b-6 A b^3-4 a^3 B+9 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}-\frac {a^2 \left (a^4 A b-2 a^2 A b^3+6 A b^5-4 a^5 B+11 a^3 b^2 B-12 a b^4 B\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))}-\frac {\left (a \left (2 a^6 A b-7 a^4 A b^3+8 a^2 A b^5-8 A b^7-8 a^7 B+28 a^5 b^2 B-35 a^3 b^4 B+20 a b^6 B\right )\right ) \text {Subst}\left (\int \frac {1}{1+\frac {a}{b}+\left (1-\frac {a}{b}\right ) x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{b^6 \left (a^2-b^2\right )^3 d} \\ & = \frac {(A b-4 a B) \text {arctanh}(\sin (c+d x))}{b^5 d}-\frac {a \left (2 a^6 A b-7 a^4 A b^3+8 a^2 A b^5-8 A b^7-8 a^7 B+28 a^5 b^2 B-35 a^3 b^4 B+20 a b^6 B\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} b^5 (a+b)^{7/2} d}-\frac {\left (3 a^3 A b-8 a A b^3-12 a^4 B+23 a^2 b^2 B-6 b^4 B\right ) \tan (c+d x)}{6 b^4 \left (a^2-b^2\right )^2 d}+\frac {a (A b-a B) \sec ^3(c+d x) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac {a \left (a^2 A b-6 A b^3-4 a^3 B+9 a b^2 B\right ) \sec ^2(c+d x) \tan (c+d x)}{6 b^2 \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}-\frac {a^2 \left (a^4 A b-2 a^2 A b^3+6 A b^5-4 a^5 B+11 a^3 b^2 B-12 a b^4 B\right ) \tan (c+d x)}{2 b^4 \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))} \\
\end{align*}
Mathematica [A] (verified)
Time = 4.11 (sec) , antiderivative size = 548, normalized size of antiderivative = 1.31
\[
\int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\frac {-\frac {48 a \left (-2 a^6 A b+7 a^4 A b^3-8 a^2 A b^5+8 A b^7+8 a^7 B-28 a^5 b^2 B+35 a^3 b^4 B-20 a b^6 B\right ) \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\left (a^2-b^2\right )^{7/2}}-48 (A b-4 a B) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+48 (A b-4 a B) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {2 b \left (30 a^7 A b^2-90 a^5 A b^4+120 a^3 A b^6-120 a^8 b B+318 a^6 b^3 B-246 a^4 b^5 B-36 a^2 b^7 B+24 b^9 B+a \left (18 a^7 A b-7 a^5 A b^3-50 a^3 A b^5+144 a A b^7-72 a^8 B+28 a^6 b^2 B+305 a^4 b^4 B-438 a^2 b^6 B+72 b^8 B\right ) \cos (c+d x)-6 a^2 b \left (-5 a^5 A b+15 a^3 A b^3-20 a A b^5+20 a^6 B-57 a^4 b^2 B+53 a^2 b^4 B-6 b^6 B\right ) \cos (2 (c+d x))+6 a^8 A b \cos (3 (c+d x))-17 a^6 A b^3 \cos (3 (c+d x))+26 a^4 A b^5 \cos (3 (c+d x))-24 a^9 B \cos (3 (c+d x))+68 a^7 b^2 B \cos (3 (c+d x))-65 a^5 b^4 B \cos (3 (c+d x))+6 a^3 b^6 B \cos (3 (c+d x))\right ) \tan (c+d x)}{\left (-a^2+b^2\right )^3 (b+a \cos (c+d x))^3}}{48 b^5 d}
\]
[In]
Integrate[(Sec[c + d*x]^5*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^4,x]
[Out]
((-48*a*(-2*a^6*A*b + 7*a^4*A*b^3 - 8*a^2*A*b^5 + 8*A*b^7 + 8*a^7*B - 28*a^5*b^2*B + 35*a^3*b^4*B - 20*a*b^6*B
)*ArcTanh[((-a + b)*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/(a^2 - b^2)^(7/2) - 48*(A*b - 4*a*B)*Log[Cos[(c + d*x)
/2] - Sin[(c + d*x)/2]] + 48*(A*b - 4*a*B)*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + (2*b*(30*a^7*A*b^2 - 90*
a^5*A*b^4 + 120*a^3*A*b^6 - 120*a^8*b*B + 318*a^6*b^3*B - 246*a^4*b^5*B - 36*a^2*b^7*B + 24*b^9*B + a*(18*a^7*
A*b - 7*a^5*A*b^3 - 50*a^3*A*b^5 + 144*a*A*b^7 - 72*a^8*B + 28*a^6*b^2*B + 305*a^4*b^4*B - 438*a^2*b^6*B + 72*
b^8*B)*Cos[c + d*x] - 6*a^2*b*(-5*a^5*A*b + 15*a^3*A*b^3 - 20*a*A*b^5 + 20*a^6*B - 57*a^4*b^2*B + 53*a^2*b^4*B
- 6*b^6*B)*Cos[2*(c + d*x)] + 6*a^8*A*b*Cos[3*(c + d*x)] - 17*a^6*A*b^3*Cos[3*(c + d*x)] + 26*a^4*A*b^5*Cos[3
*(c + d*x)] - 24*a^9*B*Cos[3*(c + d*x)] + 68*a^7*b^2*B*Cos[3*(c + d*x)] - 65*a^5*b^4*B*Cos[3*(c + d*x)] + 6*a^
3*b^6*B*Cos[3*(c + d*x)])*Tan[c + d*x])/((-a^2 + b^2)^3*(b + a*Cos[c + d*x])^3))/(48*b^5*d)
Maple [A] (verified)
Time = 2.08 (sec) , antiderivative size = 591, normalized size of antiderivative = 1.41
| | |
method | result | size |
| | |
derivativedivides |
\(\frac {-\frac {B}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\left (A b -4 B a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{5}}+\frac {2 a \left (\frac {\frac {\left (2 A \,a^{4} b -A \,a^{3} b^{2}-6 A \,a^{2} b^{3}+4 A a \,b^{4}+12 A \,b^{5}-6 B \,a^{5}+2 B \,a^{4} b +18 B \,a^{3} b^{2}-5 B \,a^{2} b^{3}-20 B a \,b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {2 \left (3 A \,a^{4} b -11 A \,a^{2} b^{3}+18 A \,b^{5}-9 B \,a^{5}+29 B \,a^{3} b^{2}-30 B a \,b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 \left (a^{2}-2 a b +b^{2}\right ) \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (2 A \,a^{4} b +A \,a^{3} b^{2}-6 A \,a^{2} b^{3}-4 A a \,b^{4}+12 A \,b^{5}-6 B \,a^{5}-2 B \,a^{4} b +18 B \,a^{3} b^{2}+5 B \,a^{2} b^{3}-20 B a \,b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{3}}-\frac {\left (2 A \,a^{6} b -7 A \,a^{4} b^{3}+8 A \,a^{2} b^{5}-8 A \,b^{7}-8 B \,a^{7}+28 B \,a^{5} b^{2}-35 B \,a^{3} b^{4}+20 B a \,b^{6}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{2 \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{5}}-\frac {B}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\left (-A b +4 B a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{5}}}{d}\) |
\(591\) |
default |
\(\frac {-\frac {B}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}+\frac {\left (A b -4 B a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{5}}+\frac {2 a \left (\frac {\frac {\left (2 A \,a^{4} b -A \,a^{3} b^{2}-6 A \,a^{2} b^{3}+4 A a \,b^{4}+12 A \,b^{5}-6 B \,a^{5}+2 B \,a^{4} b +18 B \,a^{3} b^{2}-5 B \,a^{2} b^{3}-20 B a \,b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{2 \left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}-\frac {2 \left (3 A \,a^{4} b -11 A \,a^{2} b^{3}+18 A \,b^{5}-9 B \,a^{5}+29 B \,a^{3} b^{2}-30 B a \,b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 \left (a^{2}-2 a b +b^{2}\right ) \left (a^{2}+2 a b +b^{2}\right )}+\frac {\left (2 A \,a^{4} b +A \,a^{3} b^{2}-6 A \,a^{2} b^{3}-4 A a \,b^{4}+12 A \,b^{5}-6 B \,a^{5}-2 B \,a^{4} b +18 B \,a^{3} b^{2}+5 B \,a^{2} b^{3}-20 B a \,b^{4}\right ) a b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 \left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{3}}-\frac {\left (2 A \,a^{6} b -7 A \,a^{4} b^{3}+8 A \,a^{2} b^{5}-8 A \,b^{7}-8 B \,a^{7}+28 B \,a^{5} b^{2}-35 B \,a^{3} b^{4}+20 B a \,b^{6}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{2 \left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{b^{5}}-\frac {B}{b^{4} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}+\frac {\left (-A b +4 B a \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{5}}}{d}\) |
\(591\) |
risch |
\(\text {Expression too large to display}\) |
\(2577\) |
| | |
|
|
|
[In]
int(sec(d*x+c)^5*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x,method=_RETURNVERBOSE)
[Out]
1/d*(-B/b^4/(tan(1/2*d*x+1/2*c)+1)+(A*b-4*B*a)/b^5*ln(tan(1/2*d*x+1/2*c)+1)+2*a/b^5*((1/2*(2*A*a^4*b-A*a^3*b^2
-6*A*a^2*b^3+4*A*a*b^4+12*A*b^5-6*B*a^5+2*B*a^4*b+18*B*a^3*b^2-5*B*a^2*b^3-20*B*a*b^4)*a*b/(a-b)/(a^3+3*a^2*b+
3*a*b^2+b^3)*tan(1/2*d*x+1/2*c)^5-2/3*(3*A*a^4*b-11*A*a^2*b^3+18*A*b^5-9*B*a^5+29*B*a^3*b^2-30*B*a*b^4)*a*b/(a
^2-2*a*b+b^2)/(a^2+2*a*b+b^2)*tan(1/2*d*x+1/2*c)^3+1/2*(2*A*a^4*b+A*a^3*b^2-6*A*a^2*b^3-4*A*a*b^4+12*A*b^5-6*B
*a^5-2*B*a^4*b+18*B*a^3*b^2+5*B*a^2*b^3-20*B*a*b^4)*a*b/(a+b)/(a^3-3*a^2*b+3*a*b^2-b^3)*tan(1/2*d*x+1/2*c))/(t
an(1/2*d*x+1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b-a-b)^3-1/2*(2*A*a^6*b-7*A*a^4*b^3+8*A*a^2*b^5-8*A*b^7-8*B*a^7+28*
B*a^5*b^2-35*B*a^3*b^4+20*B*a*b^6)/(a^6-3*a^4*b^2+3*a^2*b^4-b^6)/((a-b)*(a+b))^(1/2)*arctanh((a-b)*tan(1/2*d*x
+1/2*c)/((a-b)*(a+b))^(1/2)))-B/b^4/(tan(1/2*d*x+1/2*c)-1)+1/b^5*(-A*b+4*B*a)*ln(tan(1/2*d*x+1/2*c)-1))
Fricas [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 1688 vs. \(2 (404) = 808\).
Time = 76.66 (sec) , antiderivative size = 3434, normalized size of antiderivative = 8.22
\[
\int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\text {Too large to display}
\]
[In]
integrate(sec(d*x+c)^5*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x, algorithm="fricas")
[Out]
[-1/12*(3*((8*B*a^11 - 2*A*a^10*b - 28*B*a^9*b^2 + 7*A*a^8*b^3 + 35*B*a^7*b^4 - 8*A*a^6*b^5 - 20*B*a^5*b^6 + 8
*A*a^4*b^7)*cos(d*x + c)^4 + 3*(8*B*a^10*b - 2*A*a^9*b^2 - 28*B*a^8*b^3 + 7*A*a^7*b^4 + 35*B*a^6*b^5 - 8*A*a^5
*b^6 - 20*B*a^4*b^7 + 8*A*a^3*b^8)*cos(d*x + c)^3 + 3*(8*B*a^9*b^2 - 2*A*a^8*b^3 - 28*B*a^7*b^4 + 7*A*a^6*b^5
+ 35*B*a^5*b^6 - 8*A*a^4*b^7 - 20*B*a^3*b^8 + 8*A*a^2*b^9)*cos(d*x + c)^2 + (8*B*a^8*b^3 - 2*A*a^7*b^4 - 28*B*
a^6*b^5 + 7*A*a^5*b^6 + 35*B*a^4*b^7 - 8*A*a^3*b^8 - 20*B*a^2*b^9 + 8*A*a*b^10)*cos(d*x + c))*sqrt(a^2 - b^2)*
log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 - 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin(d*x + c) +
2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^2)) + 6*((4*B*a^12 - A*a^11*b - 16*B*a^10*b^2 + 4*A
*a^9*b^3 + 24*B*a^8*b^4 - 6*A*a^7*b^5 - 16*B*a^6*b^6 + 4*A*a^5*b^7 + 4*B*a^4*b^8 - A*a^3*b^9)*cos(d*x + c)^4 +
3*(4*B*a^11*b - A*a^10*b^2 - 16*B*a^9*b^3 + 4*A*a^8*b^4 + 24*B*a^7*b^5 - 6*A*a^6*b^6 - 16*B*a^5*b^7 + 4*A*a^4
*b^8 + 4*B*a^3*b^9 - A*a^2*b^10)*cos(d*x + c)^3 + 3*(4*B*a^10*b^2 - A*a^9*b^3 - 16*B*a^8*b^4 + 4*A*a^7*b^5 + 2
4*B*a^6*b^6 - 6*A*a^5*b^7 - 16*B*a^4*b^8 + 4*A*a^3*b^9 + 4*B*a^2*b^10 - A*a*b^11)*cos(d*x + c)^2 + (4*B*a^9*b^
3 - A*a^8*b^4 - 16*B*a^7*b^5 + 4*A*a^6*b^6 + 24*B*a^5*b^7 - 6*A*a^4*b^8 - 16*B*a^3*b^9 + 4*A*a^2*b^10 + 4*B*a*
b^11 - A*b^12)*cos(d*x + c))*log(sin(d*x + c) + 1) - 6*((4*B*a^12 - A*a^11*b - 16*B*a^10*b^2 + 4*A*a^9*b^3 + 2
4*B*a^8*b^4 - 6*A*a^7*b^5 - 16*B*a^6*b^6 + 4*A*a^5*b^7 + 4*B*a^4*b^8 - A*a^3*b^9)*cos(d*x + c)^4 + 3*(4*B*a^11
*b - A*a^10*b^2 - 16*B*a^9*b^3 + 4*A*a^8*b^4 + 24*B*a^7*b^5 - 6*A*a^6*b^6 - 16*B*a^5*b^7 + 4*A*a^4*b^8 + 4*B*a
^3*b^9 - A*a^2*b^10)*cos(d*x + c)^3 + 3*(4*B*a^10*b^2 - A*a^9*b^3 - 16*B*a^8*b^4 + 4*A*a^7*b^5 + 24*B*a^6*b^6
- 6*A*a^5*b^7 - 16*B*a^4*b^8 + 4*A*a^3*b^9 + 4*B*a^2*b^10 - A*a*b^11)*cos(d*x + c)^2 + (4*B*a^9*b^3 - A*a^8*b^
4 - 16*B*a^7*b^5 + 4*A*a^6*b^6 + 24*B*a^5*b^7 - 6*A*a^4*b^8 - 16*B*a^3*b^9 + 4*A*a^2*b^10 + 4*B*a*b^11 - A*b^1
2)*cos(d*x + c))*log(-sin(d*x + c) + 1) - 2*(6*B*a^8*b^4 - 24*B*a^6*b^6 + 36*B*a^4*b^8 - 24*B*a^2*b^10 + 6*B*b
^12 + (24*B*a^11*b - 6*A*a^10*b^2 - 92*B*a^9*b^3 + 23*A*a^8*b^4 + 133*B*a^7*b^5 - 43*A*a^6*b^6 - 71*B*a^5*b^7
+ 26*A*a^4*b^8 + 6*B*a^3*b^9)*cos(d*x + c)^3 + 3*(20*B*a^10*b^2 - 5*A*a^9*b^3 - 77*B*a^8*b^4 + 20*A*a^7*b^5 +
110*B*a^6*b^6 - 35*A*a^5*b^7 - 59*B*a^4*b^8 + 20*A*a^3*b^9 + 6*B*a^2*b^10)*cos(d*x + c)^2 + (44*B*a^9*b^3 - 11
*A*a^8*b^4 - 169*B*a^7*b^5 + 43*A*a^6*b^6 + 239*B*a^5*b^7 - 68*A*a^4*b^8 - 132*B*a^3*b^9 + 36*A*a^2*b^10 + 18*
B*a*b^11)*cos(d*x + c))*sin(d*x + c))/((a^11*b^5 - 4*a^9*b^7 + 6*a^7*b^9 - 4*a^5*b^11 + a^3*b^13)*d*cos(d*x +
c)^4 + 3*(a^10*b^6 - 4*a^8*b^8 + 6*a^6*b^10 - 4*a^4*b^12 + a^2*b^14)*d*cos(d*x + c)^3 + 3*(a^9*b^7 - 4*a^7*b^9
+ 6*a^5*b^11 - 4*a^3*b^13 + a*b^15)*d*cos(d*x + c)^2 + (a^8*b^8 - 4*a^6*b^10 + 6*a^4*b^12 - 4*a^2*b^14 + b^16
)*d*cos(d*x + c)), 1/6*(3*((8*B*a^11 - 2*A*a^10*b - 28*B*a^9*b^2 + 7*A*a^8*b^3 + 35*B*a^7*b^4 - 8*A*a^6*b^5 -
20*B*a^5*b^6 + 8*A*a^4*b^7)*cos(d*x + c)^4 + 3*(8*B*a^10*b - 2*A*a^9*b^2 - 28*B*a^8*b^3 + 7*A*a^7*b^4 + 35*B*a
^6*b^5 - 8*A*a^5*b^6 - 20*B*a^4*b^7 + 8*A*a^3*b^8)*cos(d*x + c)^3 + 3*(8*B*a^9*b^2 - 2*A*a^8*b^3 - 28*B*a^7*b^
4 + 7*A*a^6*b^5 + 35*B*a^5*b^6 - 8*A*a^4*b^7 - 20*B*a^3*b^8 + 8*A*a^2*b^9)*cos(d*x + c)^2 + (8*B*a^8*b^3 - 2*A
*a^7*b^4 - 28*B*a^6*b^5 + 7*A*a^5*b^6 + 35*B*a^4*b^7 - 8*A*a^3*b^8 - 20*B*a^2*b^9 + 8*A*a*b^10)*cos(d*x + c))*
sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^2 - b^2)*sin(d*x + c))) - 3*((4*B*a^12 - A*
a^11*b - 16*B*a^10*b^2 + 4*A*a^9*b^3 + 24*B*a^8*b^4 - 6*A*a^7*b^5 - 16*B*a^6*b^6 + 4*A*a^5*b^7 + 4*B*a^4*b^8 -
A*a^3*b^9)*cos(d*x + c)^4 + 3*(4*B*a^11*b - A*a^10*b^2 - 16*B*a^9*b^3 + 4*A*a^8*b^4 + 24*B*a^7*b^5 - 6*A*a^6*
b^6 - 16*B*a^5*b^7 + 4*A*a^4*b^8 + 4*B*a^3*b^9 - A*a^2*b^10)*cos(d*x + c)^3 + 3*(4*B*a^10*b^2 - A*a^9*b^3 - 16
*B*a^8*b^4 + 4*A*a^7*b^5 + 24*B*a^6*b^6 - 6*A*a^5*b^7 - 16*B*a^4*b^8 + 4*A*a^3*b^9 + 4*B*a^2*b^10 - A*a*b^11)*
cos(d*x + c)^2 + (4*B*a^9*b^3 - A*a^8*b^4 - 16*B*a^7*b^5 + 4*A*a^6*b^6 + 24*B*a^5*b^7 - 6*A*a^4*b^8 - 16*B*a^3
*b^9 + 4*A*a^2*b^10 + 4*B*a*b^11 - A*b^12)*cos(d*x + c))*log(sin(d*x + c) + 1) + 3*((4*B*a^12 - A*a^11*b - 16*
B*a^10*b^2 + 4*A*a^9*b^3 + 24*B*a^8*b^4 - 6*A*a^7*b^5 - 16*B*a^6*b^6 + 4*A*a^5*b^7 + 4*B*a^4*b^8 - A*a^3*b^9)*
cos(d*x + c)^4 + 3*(4*B*a^11*b - A*a^10*b^2 - 16*B*a^9*b^3 + 4*A*a^8*b^4 + 24*B*a^7*b^5 - 6*A*a^6*b^6 - 16*B*a
^5*b^7 + 4*A*a^4*b^8 + 4*B*a^3*b^9 - A*a^2*b^10)*cos(d*x + c)^3 + 3*(4*B*a^10*b^2 - A*a^9*b^3 - 16*B*a^8*b^4 +
4*A*a^7*b^5 + 24*B*a^6*b^6 - 6*A*a^5*b^7 - 16*B*a^4*b^8 + 4*A*a^3*b^9 + 4*B*a^2*b^10 - A*a*b^11)*cos(d*x + c)
^2 + (4*B*a^9*b^3 - A*a^8*b^4 - 16*B*a^7*b^5 + 4*A*a^6*b^6 + 24*B*a^5*b^7 - 6*A*a^4*b^8 - 16*B*a^3*b^9 + 4*A*a
^2*b^10 + 4*B*a*b^11 - A*b^12)*cos(d*x + c))*log(-sin(d*x + c) + 1) + (6*B*a^8*b^4 - 24*B*a^6*b^6 + 36*B*a^4*b
^8 - 24*B*a^2*b^10 + 6*B*b^12 + (24*B*a^11*b - 6*A*a^10*b^2 - 92*B*a^9*b^3 + 23*A*a^8*b^4 + 133*B*a^7*b^5 - 43
*A*a^6*b^6 - 71*B*a^5*b^7 + 26*A*a^4*b^8 + 6*B*a^3*b^9)*cos(d*x + c)^3 + 3*(20*B*a^10*b^2 - 5*A*a^9*b^3 - 77*B
*a^8*b^4 + 20*A*a^7*b^5 + 110*B*a^6*b^6 - 35*A*a^5*b^7 - 59*B*a^4*b^8 + 20*A*a^3*b^9 + 6*B*a^2*b^10)*cos(d*x +
c)^2 + (44*B*a^9*b^3 - 11*A*a^8*b^4 - 169*B*a^7*b^5 + 43*A*a^6*b^6 + 239*B*a^5*b^7 - 68*A*a^4*b^8 - 132*B*a^3
*b^9 + 36*A*a^2*b^10 + 18*B*a*b^11)*cos(d*x + c))*sin(d*x + c))/((a^11*b^5 - 4*a^9*b^7 + 6*a^7*b^9 - 4*a^5*b^1
1 + a^3*b^13)*d*cos(d*x + c)^4 + 3*(a^10*b^6 - 4*a^8*b^8 + 6*a^6*b^10 - 4*a^4*b^12 + a^2*b^14)*d*cos(d*x + c)^
3 + 3*(a^9*b^7 - 4*a^7*b^9 + 6*a^5*b^11 - 4*a^3*b^13 + a*b^15)*d*cos(d*x + c)^2 + (a^8*b^8 - 4*a^6*b^10 + 6*a^
4*b^12 - 4*a^2*b^14 + b^16)*d*cos(d*x + c))]
Sympy [F]
\[
\int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\int \frac {\left (A + B \sec {\left (c + d x \right )}\right ) \sec ^{5}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{4}}\, dx
\]
[In]
integrate(sec(d*x+c)**5*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))**4,x)
[Out]
Integral((A + B*sec(c + d*x))*sec(c + d*x)**5/(a + b*sec(c + d*x))**4, x)
Maxima [F(-2)]
Exception generated. \[
\int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\text {Exception raised: ValueError}
\]
[In]
integrate(sec(d*x+c)^5*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x, algorithm="maxima")
[Out]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?`
for more de
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 1005 vs. \(2 (404) = 808\).
Time = 0.41 (sec) , antiderivative size = 1005, normalized size of antiderivative = 2.40
\[
\int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\text {Too large to display}
\]
[In]
integrate(sec(d*x+c)^5*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x, algorithm="giac")
[Out]
1/3*(3*(8*B*a^8 - 2*A*a^7*b - 28*B*a^6*b^2 + 7*A*a^5*b^3 + 35*B*a^4*b^4 - 8*A*a^3*b^5 - 20*B*a^2*b^6 + 8*A*a*b
^7)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*
c))/sqrt(-a^2 + b^2)))/((a^6*b^5 - 3*a^4*b^7 + 3*a^2*b^9 - b^11)*sqrt(-a^2 + b^2)) - (18*B*a^9*tan(1/2*d*x + 1
/2*c)^5 - 6*A*a^8*b*tan(1/2*d*x + 1/2*c)^5 - 42*B*a^8*b*tan(1/2*d*x + 1/2*c)^5 + 15*A*a^7*b^2*tan(1/2*d*x + 1/
2*c)^5 - 24*B*a^7*b^2*tan(1/2*d*x + 1/2*c)^5 + 6*A*a^6*b^3*tan(1/2*d*x + 1/2*c)^5 + 117*B*a^6*b^3*tan(1/2*d*x
+ 1/2*c)^5 - 45*A*a^5*b^4*tan(1/2*d*x + 1/2*c)^5 - 24*B*a^5*b^4*tan(1/2*d*x + 1/2*c)^5 + 6*A*a^4*b^5*tan(1/2*d
*x + 1/2*c)^5 - 105*B*a^4*b^5*tan(1/2*d*x + 1/2*c)^5 + 60*A*a^3*b^6*tan(1/2*d*x + 1/2*c)^5 + 60*B*a^3*b^6*tan(
1/2*d*x + 1/2*c)^5 - 36*A*a^2*b^7*tan(1/2*d*x + 1/2*c)^5 - 36*B*a^9*tan(1/2*d*x + 1/2*c)^3 + 12*A*a^8*b*tan(1/
2*d*x + 1/2*c)^3 + 152*B*a^7*b^2*tan(1/2*d*x + 1/2*c)^3 - 56*A*a^6*b^3*tan(1/2*d*x + 1/2*c)^3 - 236*B*a^5*b^4*
tan(1/2*d*x + 1/2*c)^3 + 116*A*a^4*b^5*tan(1/2*d*x + 1/2*c)^3 + 120*B*a^3*b^6*tan(1/2*d*x + 1/2*c)^3 - 72*A*a^
2*b^7*tan(1/2*d*x + 1/2*c)^3 + 18*B*a^9*tan(1/2*d*x + 1/2*c) - 6*A*a^8*b*tan(1/2*d*x + 1/2*c) + 42*B*a^8*b*tan
(1/2*d*x + 1/2*c) - 15*A*a^7*b^2*tan(1/2*d*x + 1/2*c) - 24*B*a^7*b^2*tan(1/2*d*x + 1/2*c) + 6*A*a^6*b^3*tan(1/
2*d*x + 1/2*c) - 117*B*a^6*b^3*tan(1/2*d*x + 1/2*c) + 45*A*a^5*b^4*tan(1/2*d*x + 1/2*c) - 24*B*a^5*b^4*tan(1/2
*d*x + 1/2*c) + 6*A*a^4*b^5*tan(1/2*d*x + 1/2*c) + 105*B*a^4*b^5*tan(1/2*d*x + 1/2*c) - 60*A*a^3*b^6*tan(1/2*d
*x + 1/2*c) + 60*B*a^3*b^6*tan(1/2*d*x + 1/2*c) - 36*A*a^2*b^7*tan(1/2*d*x + 1/2*c))/((a^6*b^4 - 3*a^4*b^6 + 3
*a^2*b^8 - b^10)*(a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 - a - b)^3) - 3*(4*B*a - A*b)*log(abs(ta
n(1/2*d*x + 1/2*c) + 1))/b^5 + 3*(4*B*a - A*b)*log(abs(tan(1/2*d*x + 1/2*c) - 1))/b^5 - 6*B*tan(1/2*d*x + 1/2*
c)/((tan(1/2*d*x + 1/2*c)^2 - 1)*b^4))/d
Mupad [B] (verification not implemented)
Time = 34.95 (sec) , antiderivative size = 13092, normalized size of antiderivative = 31.32
\[
\int \frac {\sec ^5(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\text {Too large to display}
\]
[In]
int((A + B/cos(c + d*x))/(cos(c + d*x)^5*(a + b/cos(c + d*x))^4),x)
[Out]
((tan(c/2 + (d*x)/2)^7*(12*A*a^2*b^5 - 2*B*b^7 - 8*B*a^7 + 4*A*a^3*b^4 - 6*A*a^4*b^3 - A*a^5*b^2 + 6*B*a^2*b^5
- 26*B*a^3*b^4 - 11*B*a^4*b^3 + 24*B*a^5*b^2 + 2*A*a^6*b + 2*B*a*b^6 + 4*B*a^6*b))/(b^4*(a + b)^3*(a - b)) -
(tan(c/2 + (d*x)/2)^3*(72*B*a^8 + 18*B*b^8 + 36*A*a^2*b^6 - 96*A*a^3*b^5 - 14*A*a^4*b^4 + 59*A*a^5*b^3 + 3*A*a
^6*b^2 - 72*B*a^2*b^6 - 60*B*a^3*b^5 + 273*B*a^4*b^4 + 47*B*a^5*b^3 - 236*B*a^6*b^2 - 18*A*a^7*b - 12*B*a^7*b)
)/(3*b^4*(a + b)^2*(a - b)^3) + (tan(c/2 + (d*x)/2)^5*(72*B*a^8 + 18*B*b^8 - 36*A*a^2*b^6 - 96*A*a^3*b^5 + 14*
A*a^4*b^4 + 59*A*a^5*b^3 - 3*A*a^6*b^2 - 72*B*a^2*b^6 + 60*B*a^3*b^5 + 273*B*a^4*b^4 - 47*B*a^5*b^3 - 236*B*a^
6*b^2 - 18*A*a^7*b + 12*B*a^7*b))/(3*b^4*(a + b)^3*(a - b)^2) - (tan(c/2 + (d*x)/2)*(2*B*b^7 - 8*B*a^7 + 12*A*
a^2*b^5 - 4*A*a^3*b^4 - 6*A*a^4*b^3 + A*a^5*b^2 - 6*B*a^2*b^5 - 26*B*a^3*b^4 + 11*B*a^4*b^3 + 24*B*a^5*b^2 + 2
*A*a^6*b + 2*B*a*b^6 - 4*B*a^6*b))/(b^4*(a + b)*(a - b)^3))/(d*(3*a*b^2 + 3*a^2*b - tan(c/2 + (d*x)/2)^4*(6*a*
b^2 - 6*a^3) - tan(c/2 + (d*x)/2)^2*(6*a^2*b + 4*a^3 - 2*b^3) - tan(c/2 + (d*x)/2)^6*(4*a^3 - 6*a^2*b + 2*b^3)
+ a^3 + b^3 + tan(c/2 + (d*x)/2)^8*(3*a*b^2 - 3*a^2*b + a^3 - b^3))) + (atan((((((A*b - 4*B*a)*((8*(4*A*b^24
- 12*A*a^2*b^22 + 64*A*a^3*b^21 + 20*A*a^4*b^20 - 110*A*a^5*b^19 - 30*A*a^6*b^18 + 110*A*a^7*b^17 + 30*A*a^8*b
^16 - 70*A*a^9*b^15 - 14*A*a^10*b^14 + 26*A*a^11*b^13 + 2*A*a^12*b^12 - 4*A*a^13*b^11 + 40*B*a^2*b^22 + 72*B*a
^3*b^21 - 190*B*a^4*b^20 - 146*B*a^5*b^19 + 386*B*a^6*b^18 + 174*B*a^7*b^17 - 434*B*a^8*b^16 - 126*B*a^9*b^15
+ 286*B*a^10*b^14 + 50*B*a^11*b^13 - 104*B*a^12*b^12 - 8*B*a^13*b^11 + 16*B*a^14*b^10 - 16*A*a*b^23 - 16*B*a*b
^23))/(a*b^22 + b^23 - 5*a^2*b^21 - 5*a^3*b^20 + 10*a^4*b^19 + 10*a^5*b^18 - 10*a^6*b^17 - 10*a^7*b^16 + 5*a^8
*b^15 + 5*a^9*b^14 - a^10*b^13 - a^11*b^12) - (8*tan(c/2 + (d*x)/2)*(A*b - 4*B*a)*(8*a*b^23 - 8*a^2*b^22 - 48*
a^3*b^21 + 48*a^4*b^20 + 120*a^5*b^19 - 120*a^6*b^18 - 160*a^7*b^17 + 160*a^8*b^16 + 120*a^9*b^15 - 120*a^10*b
^14 - 48*a^11*b^13 + 48*a^12*b^12 + 8*a^13*b^11 - 8*a^14*b^10))/(b^5*(a*b^18 + b^19 - 5*a^2*b^17 - 5*a^3*b^16
+ 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5*a^9*b^10 - a^10*b^9 - a^11*b^8))))/b^
5 - (8*tan(c/2 + (d*x)/2)*(4*A^2*b^16 + 128*B^2*a^16 - 8*A^2*a*b^15 - 128*B^2*a^15*b + 44*A^2*a^2*b^14 + 48*A^
2*a^3*b^13 - 92*A^2*a^4*b^12 - 120*A^2*a^5*b^11 + 156*A^2*a^6*b^10 + 160*A^2*a^7*b^9 - 164*A^2*a^8*b^8 - 120*A
^2*a^9*b^7 + 117*A^2*a^10*b^6 + 48*A^2*a^11*b^5 - 48*A^2*a^12*b^4 - 8*A^2*a^13*b^3 + 8*A^2*a^14*b^2 + 64*B^2*a
^2*b^14 - 128*B^2*a^3*b^13 + 80*B^2*a^4*b^12 + 768*B^2*a^5*b^11 - 824*B^2*a^6*b^10 - 1920*B^2*a^7*b^9 + 2025*B
^2*a^8*b^8 + 2560*B^2*a^9*b^7 - 2600*B^2*a^10*b^6 - 1920*B^2*a^11*b^5 + 1920*B^2*a^12*b^4 + 768*B^2*a^13*b^3 -
768*B^2*a^14*b^2 - 32*A*B*a*b^15 - 64*A*B*a^15*b + 64*A*B*a^2*b^14 - 160*A*B*a^3*b^13 - 384*A*B*a^4*b^12 + 59
2*A*B*a^5*b^11 + 960*A*B*a^6*b^10 - 1128*A*B*a^7*b^9 - 1280*A*B*a^8*b^8 + 1306*A*B*a^9*b^7 + 960*A*B*a^10*b^6
- 948*A*B*a^11*b^5 - 384*A*B*a^12*b^4 + 384*A*B*a^13*b^3 + 64*A*B*a^14*b^2))/(a*b^18 + b^19 - 5*a^2*b^17 - 5*a
^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5*a^9*b^10 - a^10*b^9 - a^11*b^
8))*(A*b - 4*B*a)*1i)/b^5 - ((((A*b - 4*B*a)*((8*(4*A*b^24 - 12*A*a^2*b^22 + 64*A*a^3*b^21 + 20*A*a^4*b^20 - 1
10*A*a^5*b^19 - 30*A*a^6*b^18 + 110*A*a^7*b^17 + 30*A*a^8*b^16 - 70*A*a^9*b^15 - 14*A*a^10*b^14 + 26*A*a^11*b^
13 + 2*A*a^12*b^12 - 4*A*a^13*b^11 + 40*B*a^2*b^22 + 72*B*a^3*b^21 - 190*B*a^4*b^20 - 146*B*a^5*b^19 + 386*B*a
^6*b^18 + 174*B*a^7*b^17 - 434*B*a^8*b^16 - 126*B*a^9*b^15 + 286*B*a^10*b^14 + 50*B*a^11*b^13 - 104*B*a^12*b^1
2 - 8*B*a^13*b^11 + 16*B*a^14*b^10 - 16*A*a*b^23 - 16*B*a*b^23))/(a*b^22 + b^23 - 5*a^2*b^21 - 5*a^3*b^20 + 10
*a^4*b^19 + 10*a^5*b^18 - 10*a^6*b^17 - 10*a^7*b^16 + 5*a^8*b^15 + 5*a^9*b^14 - a^10*b^13 - a^11*b^12) + (8*ta
n(c/2 + (d*x)/2)*(A*b - 4*B*a)*(8*a*b^23 - 8*a^2*b^22 - 48*a^3*b^21 + 48*a^4*b^20 + 120*a^5*b^19 - 120*a^6*b^1
8 - 160*a^7*b^17 + 160*a^8*b^16 + 120*a^9*b^15 - 120*a^10*b^14 - 48*a^11*b^13 + 48*a^12*b^12 + 8*a^13*b^11 - 8
*a^14*b^10))/(b^5*(a*b^18 + b^19 - 5*a^2*b^17 - 5*a^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*
b^12 + 5*a^8*b^11 + 5*a^9*b^10 - a^10*b^9 - a^11*b^8))))/b^5 + (8*tan(c/2 + (d*x)/2)*(4*A^2*b^16 + 128*B^2*a^1
6 - 8*A^2*a*b^15 - 128*B^2*a^15*b + 44*A^2*a^2*b^14 + 48*A^2*a^3*b^13 - 92*A^2*a^4*b^12 - 120*A^2*a^5*b^11 + 1
56*A^2*a^6*b^10 + 160*A^2*a^7*b^9 - 164*A^2*a^8*b^8 - 120*A^2*a^9*b^7 + 117*A^2*a^10*b^6 + 48*A^2*a^11*b^5 - 4
8*A^2*a^12*b^4 - 8*A^2*a^13*b^3 + 8*A^2*a^14*b^2 + 64*B^2*a^2*b^14 - 128*B^2*a^3*b^13 + 80*B^2*a^4*b^12 + 768*
B^2*a^5*b^11 - 824*B^2*a^6*b^10 - 1920*B^2*a^7*b^9 + 2025*B^2*a^8*b^8 + 2560*B^2*a^9*b^7 - 2600*B^2*a^10*b^6 -
1920*B^2*a^11*b^5 + 1920*B^2*a^12*b^4 + 768*B^2*a^13*b^3 - 768*B^2*a^14*b^2 - 32*A*B*a*b^15 - 64*A*B*a^15*b +
64*A*B*a^2*b^14 - 160*A*B*a^3*b^13 - 384*A*B*a^4*b^12 + 592*A*B*a^5*b^11 + 960*A*B*a^6*b^10 - 1128*A*B*a^7*b^
9 - 1280*A*B*a^8*b^8 + 1306*A*B*a^9*b^7 + 960*A*B*a^10*b^6 - 948*A*B*a^11*b^5 - 384*A*B*a^12*b^4 + 384*A*B*a^1
3*b^3 + 64*A*B*a^14*b^2))/(a*b^18 + b^19 - 5*a^2*b^17 - 5*a^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 -
10*a^7*b^12 + 5*a^8*b^11 + 5*a^9*b^10 - a^10*b^9 - a^11*b^8))*(A*b - 4*B*a)*1i)/b^5)/(((((A*b - 4*B*a)*((8*(4
*A*b^24 - 12*A*a^2*b^22 + 64*A*a^3*b^21 + 20*A*a^4*b^20 - 110*A*a^5*b^19 - 30*A*a^6*b^18 + 110*A*a^7*b^17 + 30
*A*a^8*b^16 - 70*A*a^9*b^15 - 14*A*a^10*b^14 + 26*A*a^11*b^13 + 2*A*a^12*b^12 - 4*A*a^13*b^11 + 40*B*a^2*b^22
+ 72*B*a^3*b^21 - 190*B*a^4*b^20 - 146*B*a^5*b^19 + 386*B*a^6*b^18 + 174*B*a^7*b^17 - 434*B*a^8*b^16 - 126*B*a
^9*b^15 + 286*B*a^10*b^14 + 50*B*a^11*b^13 - 104*B*a^12*b^12 - 8*B*a^13*b^11 + 16*B*a^14*b^10 - 16*A*a*b^23 -
16*B*a*b^23))/(a*b^22 + b^23 - 5*a^2*b^21 - 5*a^3*b^20 + 10*a^4*b^19 + 10*a^5*b^18 - 10*a^6*b^17 - 10*a^7*b^16
+ 5*a^8*b^15 + 5*a^9*b^14 - a^10*b^13 - a^11*b^12) - (8*tan(c/2 + (d*x)/2)*(A*b - 4*B*a)*(8*a*b^23 - 8*a^2*b^
22 - 48*a^3*b^21 + 48*a^4*b^20 + 120*a^5*b^19 - 120*a^6*b^18 - 160*a^7*b^17 + 160*a^8*b^16 + 120*a^9*b^15 - 12
0*a^10*b^14 - 48*a^11*b^13 + 48*a^12*b^12 + 8*a^13*b^11 - 8*a^14*b^10))/(b^5*(a*b^18 + b^19 - 5*a^2*b^17 - 5*a
^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5*a^9*b^10 - a^10*b^9 - a^11*b^
8))))/b^5 - (8*tan(c/2 + (d*x)/2)*(4*A^2*b^16 + 128*B^2*a^16 - 8*A^2*a*b^15 - 128*B^2*a^15*b + 44*A^2*a^2*b^14
+ 48*A^2*a^3*b^13 - 92*A^2*a^4*b^12 - 120*A^2*a^5*b^11 + 156*A^2*a^6*b^10 + 160*A^2*a^7*b^9 - 164*A^2*a^8*b^8
- 120*A^2*a^9*b^7 + 117*A^2*a^10*b^6 + 48*A^2*a^11*b^5 - 48*A^2*a^12*b^4 - 8*A^2*a^13*b^3 + 8*A^2*a^14*b^2 +
64*B^2*a^2*b^14 - 128*B^2*a^3*b^13 + 80*B^2*a^4*b^12 + 768*B^2*a^5*b^11 - 824*B^2*a^6*b^10 - 1920*B^2*a^7*b^9
+ 2025*B^2*a^8*b^8 + 2560*B^2*a^9*b^7 - 2600*B^2*a^10*b^6 - 1920*B^2*a^11*b^5 + 1920*B^2*a^12*b^4 + 768*B^2*a^
13*b^3 - 768*B^2*a^14*b^2 - 32*A*B*a*b^15 - 64*A*B*a^15*b + 64*A*B*a^2*b^14 - 160*A*B*a^3*b^13 - 384*A*B*a^4*b
^12 + 592*A*B*a^5*b^11 + 960*A*B*a^6*b^10 - 1128*A*B*a^7*b^9 - 1280*A*B*a^8*b^8 + 1306*A*B*a^9*b^7 + 960*A*B*a
^10*b^6 - 948*A*B*a^11*b^5 - 384*A*B*a^12*b^4 + 384*A*B*a^13*b^3 + 64*A*B*a^14*b^2))/(a*b^18 + b^19 - 5*a^2*b^
17 - 5*a^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5*a^9*b^10 - a^10*b^9 -
a^11*b^8))*(A*b - 4*B*a))/b^5 - (16*(256*B^3*a^16 - 16*A^3*a*b^15 - 128*B^3*a^15*b - 48*A^3*a^2*b^14 + 64*A^3
*a^3*b^13 + 64*A^3*a^4*b^12 - 110*A^3*a^5*b^11 - 66*A^3*a^6*b^10 + 110*A^3*a^7*b^9 + 34*A^3*a^8*b^8 - 70*A^3*a
^9*b^7 - 11*A^3*a^10*b^6 + 26*A^3*a^11*b^5 + 2*A^3*a^12*b^4 - 4*A^3*a^13*b^3 + 640*B^3*a^4*b^12 + 960*B^3*a^5*
b^11 - 3040*B^3*a^6*b^10 - 2560*B^3*a^7*b^9 + 6176*B^3*a^8*b^8 + 3204*B^3*a^9*b^7 - 6944*B^3*a^10*b^6 - 2176*B
^3*a^11*b^5 + 4576*B^3*a^12*b^4 + 800*B^3*a^13*b^3 - 1664*B^3*a^14*b^2 - 192*A*B^2*a^15*b - 576*A*B^2*a^3*b^13
- 1104*A*B^2*a^4*b^12 + 2544*A*B^2*a^5*b^11 + 2376*A*B^2*a^6*b^10 - 4848*A*B^2*a^7*b^9 - 2649*A*B^2*a^8*b^8 +
5232*A*B^2*a^9*b^7 + 1632*A*B^2*a^10*b^6 - 3408*A*B^2*a^11*b^5 - 576*A*B^2*a^12*b^4 + 1248*A*B^2*a^13*b^3 + 9
6*A*B^2*a^14*b^2 + 168*A^2*B*a^2*b^14 + 408*A^2*B*a^3*b^13 - 702*A^2*B*a^4*b^12 - 690*A^2*B*a^5*b^11 + 1266*A^
2*B*a^6*b^10 + 726*A^2*B*a^7*b^9 - 1314*A^2*B*a^8*b^8 - 408*A^2*B*a^9*b^7 + 846*A^2*B*a^10*b^6 + 138*A^2*B*a^1
1*b^5 - 312*A^2*B*a^12*b^4 - 24*A^2*B*a^13*b^3 + 48*A^2*B*a^14*b^2))/(a*b^22 + b^23 - 5*a^2*b^21 - 5*a^3*b^20
+ 10*a^4*b^19 + 10*a^5*b^18 - 10*a^6*b^17 - 10*a^7*b^16 + 5*a^8*b^15 + 5*a^9*b^14 - a^10*b^13 - a^11*b^12) + (
(((A*b - 4*B*a)*((8*(4*A*b^24 - 12*A*a^2*b^22 + 64*A*a^3*b^21 + 20*A*a^4*b^20 - 110*A*a^5*b^19 - 30*A*a^6*b^18
+ 110*A*a^7*b^17 + 30*A*a^8*b^16 - 70*A*a^9*b^15 - 14*A*a^10*b^14 + 26*A*a^11*b^13 + 2*A*a^12*b^12 - 4*A*a^13
*b^11 + 40*B*a^2*b^22 + 72*B*a^3*b^21 - 190*B*a^4*b^20 - 146*B*a^5*b^19 + 386*B*a^6*b^18 + 174*B*a^7*b^17 - 43
4*B*a^8*b^16 - 126*B*a^9*b^15 + 286*B*a^10*b^14 + 50*B*a^11*b^13 - 104*B*a^12*b^12 - 8*B*a^13*b^11 + 16*B*a^14
*b^10 - 16*A*a*b^23 - 16*B*a*b^23))/(a*b^22 + b^23 - 5*a^2*b^21 - 5*a^3*b^20 + 10*a^4*b^19 + 10*a^5*b^18 - 10*
a^6*b^17 - 10*a^7*b^16 + 5*a^8*b^15 + 5*a^9*b^14 - a^10*b^13 - a^11*b^12) + (8*tan(c/2 + (d*x)/2)*(A*b - 4*B*a
)*(8*a*b^23 - 8*a^2*b^22 - 48*a^3*b^21 + 48*a^4*b^20 + 120*a^5*b^19 - 120*a^6*b^18 - 160*a^7*b^17 + 160*a^8*b^
16 + 120*a^9*b^15 - 120*a^10*b^14 - 48*a^11*b^13 + 48*a^12*b^12 + 8*a^13*b^11 - 8*a^14*b^10))/(b^5*(a*b^18 + b
^19 - 5*a^2*b^17 - 5*a^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5*a^9*b^1
0 - a^10*b^9 - a^11*b^8))))/b^5 + (8*tan(c/2 + (d*x)/2)*(4*A^2*b^16 + 128*B^2*a^16 - 8*A^2*a*b^15 - 128*B^2*a^
15*b + 44*A^2*a^2*b^14 + 48*A^2*a^3*b^13 - 92*A^2*a^4*b^12 - 120*A^2*a^5*b^11 + 156*A^2*a^6*b^10 + 160*A^2*a^7
*b^9 - 164*A^2*a^8*b^8 - 120*A^2*a^9*b^7 + 117*A^2*a^10*b^6 + 48*A^2*a^11*b^5 - 48*A^2*a^12*b^4 - 8*A^2*a^13*b
^3 + 8*A^2*a^14*b^2 + 64*B^2*a^2*b^14 - 128*B^2*a^3*b^13 + 80*B^2*a^4*b^12 + 768*B^2*a^5*b^11 - 824*B^2*a^6*b^
10 - 1920*B^2*a^7*b^9 + 2025*B^2*a^8*b^8 + 2560*B^2*a^9*b^7 - 2600*B^2*a^10*b^6 - 1920*B^2*a^11*b^5 + 1920*B^2
*a^12*b^4 + 768*B^2*a^13*b^3 - 768*B^2*a^14*b^2 - 32*A*B*a*b^15 - 64*A*B*a^15*b + 64*A*B*a^2*b^14 - 160*A*B*a^
3*b^13 - 384*A*B*a^4*b^12 + 592*A*B*a^5*b^11 + 960*A*B*a^6*b^10 - 1128*A*B*a^7*b^9 - 1280*A*B*a^8*b^8 + 1306*A
*B*a^9*b^7 + 960*A*B*a^10*b^6 - 948*A*B*a^11*b^5 - 384*A*B*a^12*b^4 + 384*A*B*a^13*b^3 + 64*A*B*a^14*b^2))/(a*
b^18 + b^19 - 5*a^2*b^17 - 5*a^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5
*a^9*b^10 - a^10*b^9 - a^11*b^8))*(A*b - 4*B*a))/b^5))*(A*b - 4*B*a)*2i)/(b^5*d) + (a*atan(((a*((8*tan(c/2 + (
d*x)/2)*(4*A^2*b^16 + 128*B^2*a^16 - 8*A^2*a*b^15 - 128*B^2*a^15*b + 44*A^2*a^2*b^14 + 48*A^2*a^3*b^13 - 92*A^
2*a^4*b^12 - 120*A^2*a^5*b^11 + 156*A^2*a^6*b^10 + 160*A^2*a^7*b^9 - 164*A^2*a^8*b^8 - 120*A^2*a^9*b^7 + 117*A
^2*a^10*b^6 + 48*A^2*a^11*b^5 - 48*A^2*a^12*b^4 - 8*A^2*a^13*b^3 + 8*A^2*a^14*b^2 + 64*B^2*a^2*b^14 - 128*B^2*
a^3*b^13 + 80*B^2*a^4*b^12 + 768*B^2*a^5*b^11 - 824*B^2*a^6*b^10 - 1920*B^2*a^7*b^9 + 2025*B^2*a^8*b^8 + 2560*
B^2*a^9*b^7 - 2600*B^2*a^10*b^6 - 1920*B^2*a^11*b^5 + 1920*B^2*a^12*b^4 + 768*B^2*a^13*b^3 - 768*B^2*a^14*b^2
- 32*A*B*a*b^15 - 64*A*B*a^15*b + 64*A*B*a^2*b^14 - 160*A*B*a^3*b^13 - 384*A*B*a^4*b^12 + 592*A*B*a^5*b^11 + 9
60*A*B*a^6*b^10 - 1128*A*B*a^7*b^9 - 1280*A*B*a^8*b^8 + 1306*A*B*a^9*b^7 + 960*A*B*a^10*b^6 - 948*A*B*a^11*b^5
- 384*A*B*a^12*b^4 + 384*A*B*a^13*b^3 + 64*A*B*a^14*b^2))/(a*b^18 + b^19 - 5*a^2*b^17 - 5*a^3*b^16 + 10*a^4*b
^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5*a^9*b^10 - a^10*b^9 - a^11*b^8) - (a*((a + b)^7
*(a - b)^7)^(1/2)*((8*(4*A*b^24 - 12*A*a^2*b^22 + 64*A*a^3*b^21 + 20*A*a^4*b^20 - 110*A*a^5*b^19 - 30*A*a^6*b^
18 + 110*A*a^7*b^17 + 30*A*a^8*b^16 - 70*A*a^9*b^15 - 14*A*a^10*b^14 + 26*A*a^11*b^13 + 2*A*a^12*b^12 - 4*A*a^
13*b^11 + 40*B*a^2*b^22 + 72*B*a^3*b^21 - 190*B*a^4*b^20 - 146*B*a^5*b^19 + 386*B*a^6*b^18 + 174*B*a^7*b^17 -
434*B*a^8*b^16 - 126*B*a^9*b^15 + 286*B*a^10*b^14 + 50*B*a^11*b^13 - 104*B*a^12*b^12 - 8*B*a^13*b^11 + 16*B*a^
14*b^10 - 16*A*a*b^23 - 16*B*a*b^23))/(a*b^22 + b^23 - 5*a^2*b^21 - 5*a^3*b^20 + 10*a^4*b^19 + 10*a^5*b^18 - 1
0*a^6*b^17 - 10*a^7*b^16 + 5*a^8*b^15 + 5*a^9*b^14 - a^10*b^13 - a^11*b^12) - (4*a*tan(c/2 + (d*x)/2)*((a + b)
^7*(a - b)^7)^(1/2)*(8*A*b^7 + 8*B*a^7 - 8*A*a^2*b^5 + 7*A*a^4*b^3 + 35*B*a^3*b^4 - 28*B*a^5*b^2 - 2*A*a^6*b -
20*B*a*b^6)*(8*a*b^23 - 8*a^2*b^22 - 48*a^3*b^21 + 48*a^4*b^20 + 120*a^5*b^19 - 120*a^6*b^18 - 160*a^7*b^17 +
160*a^8*b^16 + 120*a^9*b^15 - 120*a^10*b^14 - 48*a^11*b^13 + 48*a^12*b^12 + 8*a^13*b^11 - 8*a^14*b^10))/((b^1
9 - 7*a^2*b^17 + 21*a^4*b^15 - 35*a^6*b^13 + 35*a^8*b^11 - 21*a^10*b^9 + 7*a^12*b^7 - a^14*b^5)*(a*b^18 + b^19
- 5*a^2*b^17 - 5*a^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5*a^9*b^10 -
a^10*b^9 - a^11*b^8)))*(8*A*b^7 + 8*B*a^7 - 8*A*a^2*b^5 + 7*A*a^4*b^3 + 35*B*a^3*b^4 - 28*B*a^5*b^2 - 2*A*a^6
*b - 20*B*a*b^6))/(2*(b^19 - 7*a^2*b^17 + 21*a^4*b^15 - 35*a^6*b^13 + 35*a^8*b^11 - 21*a^10*b^9 + 7*a^12*b^7 -
a^14*b^5)))*((a + b)^7*(a - b)^7)^(1/2)*(8*A*b^7 + 8*B*a^7 - 8*A*a^2*b^5 + 7*A*a^4*b^3 + 35*B*a^3*b^4 - 28*B*
a^5*b^2 - 2*A*a^6*b - 20*B*a*b^6)*1i)/(2*(b^19 - 7*a^2*b^17 + 21*a^4*b^15 - 35*a^6*b^13 + 35*a^8*b^11 - 21*a^1
0*b^9 + 7*a^12*b^7 - a^14*b^5)) + (a*((8*tan(c/2 + (d*x)/2)*(4*A^2*b^16 + 128*B^2*a^16 - 8*A^2*a*b^15 - 128*B^
2*a^15*b + 44*A^2*a^2*b^14 + 48*A^2*a^3*b^13 - 92*A^2*a^4*b^12 - 120*A^2*a^5*b^11 + 156*A^2*a^6*b^10 + 160*A^2
*a^7*b^9 - 164*A^2*a^8*b^8 - 120*A^2*a^9*b^7 + 117*A^2*a^10*b^6 + 48*A^2*a^11*b^5 - 48*A^2*a^12*b^4 - 8*A^2*a^
13*b^3 + 8*A^2*a^14*b^2 + 64*B^2*a^2*b^14 - 128*B^2*a^3*b^13 + 80*B^2*a^4*b^12 + 768*B^2*a^5*b^11 - 824*B^2*a^
6*b^10 - 1920*B^2*a^7*b^9 + 2025*B^2*a^8*b^8 + 2560*B^2*a^9*b^7 - 2600*B^2*a^10*b^6 - 1920*B^2*a^11*b^5 + 1920
*B^2*a^12*b^4 + 768*B^2*a^13*b^3 - 768*B^2*a^14*b^2 - 32*A*B*a*b^15 - 64*A*B*a^15*b + 64*A*B*a^2*b^14 - 160*A*
B*a^3*b^13 - 384*A*B*a^4*b^12 + 592*A*B*a^5*b^11 + 960*A*B*a^6*b^10 - 1128*A*B*a^7*b^9 - 1280*A*B*a^8*b^8 + 13
06*A*B*a^9*b^7 + 960*A*B*a^10*b^6 - 948*A*B*a^11*b^5 - 384*A*B*a^12*b^4 + 384*A*B*a^13*b^3 + 64*A*B*a^14*b^2))
/(a*b^18 + b^19 - 5*a^2*b^17 - 5*a^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11
+ 5*a^9*b^10 - a^10*b^9 - a^11*b^8) + (a*((a + b)^7*(a - b)^7)^(1/2)*((8*(4*A*b^24 - 12*A*a^2*b^22 + 64*A*a^3
*b^21 + 20*A*a^4*b^20 - 110*A*a^5*b^19 - 30*A*a^6*b^18 + 110*A*a^7*b^17 + 30*A*a^8*b^16 - 70*A*a^9*b^15 - 14*A
*a^10*b^14 + 26*A*a^11*b^13 + 2*A*a^12*b^12 - 4*A*a^13*b^11 + 40*B*a^2*b^22 + 72*B*a^3*b^21 - 190*B*a^4*b^20 -
146*B*a^5*b^19 + 386*B*a^6*b^18 + 174*B*a^7*b^17 - 434*B*a^8*b^16 - 126*B*a^9*b^15 + 286*B*a^10*b^14 + 50*B*a
^11*b^13 - 104*B*a^12*b^12 - 8*B*a^13*b^11 + 16*B*a^14*b^10 - 16*A*a*b^23 - 16*B*a*b^23))/(a*b^22 + b^23 - 5*a
^2*b^21 - 5*a^3*b^20 + 10*a^4*b^19 + 10*a^5*b^18 - 10*a^6*b^17 - 10*a^7*b^16 + 5*a^8*b^15 + 5*a^9*b^14 - a^10*
b^13 - a^11*b^12) + (4*a*tan(c/2 + (d*x)/2)*((a + b)^7*(a - b)^7)^(1/2)*(8*A*b^7 + 8*B*a^7 - 8*A*a^2*b^5 + 7*A
*a^4*b^3 + 35*B*a^3*b^4 - 28*B*a^5*b^2 - 2*A*a^6*b - 20*B*a*b^6)*(8*a*b^23 - 8*a^2*b^22 - 48*a^3*b^21 + 48*a^4
*b^20 + 120*a^5*b^19 - 120*a^6*b^18 - 160*a^7*b^17 + 160*a^8*b^16 + 120*a^9*b^15 - 120*a^10*b^14 - 48*a^11*b^1
3 + 48*a^12*b^12 + 8*a^13*b^11 - 8*a^14*b^10))/((b^19 - 7*a^2*b^17 + 21*a^4*b^15 - 35*a^6*b^13 + 35*a^8*b^11 -
21*a^10*b^9 + 7*a^12*b^7 - a^14*b^5)*(a*b^18 + b^19 - 5*a^2*b^17 - 5*a^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 1
0*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5*a^9*b^10 - a^10*b^9 - a^11*b^8)))*(8*A*b^7 + 8*B*a^7 - 8*A*a^2*b^5 +
7*A*a^4*b^3 + 35*B*a^3*b^4 - 28*B*a^5*b^2 - 2*A*a^6*b - 20*B*a*b^6))/(2*(b^19 - 7*a^2*b^17 + 21*a^4*b^15 - 35
*a^6*b^13 + 35*a^8*b^11 - 21*a^10*b^9 + 7*a^12*b^7 - a^14*b^5)))*((a + b)^7*(a - b)^7)^(1/2)*(8*A*b^7 + 8*B*a^
7 - 8*A*a^2*b^5 + 7*A*a^4*b^3 + 35*B*a^3*b^4 - 28*B*a^5*b^2 - 2*A*a^6*b - 20*B*a*b^6)*1i)/(2*(b^19 - 7*a^2*b^1
7 + 21*a^4*b^15 - 35*a^6*b^13 + 35*a^8*b^11 - 21*a^10*b^9 + 7*a^12*b^7 - a^14*b^5)))/((16*(256*B^3*a^16 - 16*A
^3*a*b^15 - 128*B^3*a^15*b - 48*A^3*a^2*b^14 + 64*A^3*a^3*b^13 + 64*A^3*a^4*b^12 - 110*A^3*a^5*b^11 - 66*A^3*a
^6*b^10 + 110*A^3*a^7*b^9 + 34*A^3*a^8*b^8 - 70*A^3*a^9*b^7 - 11*A^3*a^10*b^6 + 26*A^3*a^11*b^5 + 2*A^3*a^12*b
^4 - 4*A^3*a^13*b^3 + 640*B^3*a^4*b^12 + 960*B^3*a^5*b^11 - 3040*B^3*a^6*b^10 - 2560*B^3*a^7*b^9 + 6176*B^3*a^
8*b^8 + 3204*B^3*a^9*b^7 - 6944*B^3*a^10*b^6 - 2176*B^3*a^11*b^5 + 4576*B^3*a^12*b^4 + 800*B^3*a^13*b^3 - 1664
*B^3*a^14*b^2 - 192*A*B^2*a^15*b - 576*A*B^2*a^3*b^13 - 1104*A*B^2*a^4*b^12 + 2544*A*B^2*a^5*b^11 + 2376*A*B^2
*a^6*b^10 - 4848*A*B^2*a^7*b^9 - 2649*A*B^2*a^8*b^8 + 5232*A*B^2*a^9*b^7 + 1632*A*B^2*a^10*b^6 - 3408*A*B^2*a^
11*b^5 - 576*A*B^2*a^12*b^4 + 1248*A*B^2*a^13*b^3 + 96*A*B^2*a^14*b^2 + 168*A^2*B*a^2*b^14 + 408*A^2*B*a^3*b^1
3 - 702*A^2*B*a^4*b^12 - 690*A^2*B*a^5*b^11 + 1266*A^2*B*a^6*b^10 + 726*A^2*B*a^7*b^9 - 1314*A^2*B*a^8*b^8 - 4
08*A^2*B*a^9*b^7 + 846*A^2*B*a^10*b^6 + 138*A^2*B*a^11*b^5 - 312*A^2*B*a^12*b^4 - 24*A^2*B*a^13*b^3 + 48*A^2*B
*a^14*b^2))/(a*b^22 + b^23 - 5*a^2*b^21 - 5*a^3*b^20 + 10*a^4*b^19 + 10*a^5*b^18 - 10*a^6*b^17 - 10*a^7*b^16 +
5*a^8*b^15 + 5*a^9*b^14 - a^10*b^13 - a^11*b^12) + (a*((8*tan(c/2 + (d*x)/2)*(4*A^2*b^16 + 128*B^2*a^16 - 8*A
^2*a*b^15 - 128*B^2*a^15*b + 44*A^2*a^2*b^14 + 48*A^2*a^3*b^13 - 92*A^2*a^4*b^12 - 120*A^2*a^5*b^11 + 156*A^2*
a^6*b^10 + 160*A^2*a^7*b^9 - 164*A^2*a^8*b^8 - 120*A^2*a^9*b^7 + 117*A^2*a^10*b^6 + 48*A^2*a^11*b^5 - 48*A^2*a
^12*b^4 - 8*A^2*a^13*b^3 + 8*A^2*a^14*b^2 + 64*B^2*a^2*b^14 - 128*B^2*a^3*b^13 + 80*B^2*a^4*b^12 + 768*B^2*a^5
*b^11 - 824*B^2*a^6*b^10 - 1920*B^2*a^7*b^9 + 2025*B^2*a^8*b^8 + 2560*B^2*a^9*b^7 - 2600*B^2*a^10*b^6 - 1920*B
^2*a^11*b^5 + 1920*B^2*a^12*b^4 + 768*B^2*a^13*b^3 - 768*B^2*a^14*b^2 - 32*A*B*a*b^15 - 64*A*B*a^15*b + 64*A*B
*a^2*b^14 - 160*A*B*a^3*b^13 - 384*A*B*a^4*b^12 + 592*A*B*a^5*b^11 + 960*A*B*a^6*b^10 - 1128*A*B*a^7*b^9 - 128
0*A*B*a^8*b^8 + 1306*A*B*a^9*b^7 + 960*A*B*a^10*b^6 - 948*A*B*a^11*b^5 - 384*A*B*a^12*b^4 + 384*A*B*a^13*b^3 +
64*A*B*a^14*b^2))/(a*b^18 + b^19 - 5*a^2*b^17 - 5*a^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7
*b^12 + 5*a^8*b^11 + 5*a^9*b^10 - a^10*b^9 - a^11*b^8) - (a*((a + b)^7*(a - b)^7)^(1/2)*((8*(4*A*b^24 - 12*A*a
^2*b^22 + 64*A*a^3*b^21 + 20*A*a^4*b^20 - 110*A*a^5*b^19 - 30*A*a^6*b^18 + 110*A*a^7*b^17 + 30*A*a^8*b^16 - 70
*A*a^9*b^15 - 14*A*a^10*b^14 + 26*A*a^11*b^13 + 2*A*a^12*b^12 - 4*A*a^13*b^11 + 40*B*a^2*b^22 + 72*B*a^3*b^21
- 190*B*a^4*b^20 - 146*B*a^5*b^19 + 386*B*a^6*b^18 + 174*B*a^7*b^17 - 434*B*a^8*b^16 - 126*B*a^9*b^15 + 286*B*
a^10*b^14 + 50*B*a^11*b^13 - 104*B*a^12*b^12 - 8*B*a^13*b^11 + 16*B*a^14*b^10 - 16*A*a*b^23 - 16*B*a*b^23))/(a
*b^22 + b^23 - 5*a^2*b^21 - 5*a^3*b^20 + 10*a^4*b^19 + 10*a^5*b^18 - 10*a^6*b^17 - 10*a^7*b^16 + 5*a^8*b^15 +
5*a^9*b^14 - a^10*b^13 - a^11*b^12) - (4*a*tan(c/2 + (d*x)/2)*((a + b)^7*(a - b)^7)^(1/2)*(8*A*b^7 + 8*B*a^7 -
8*A*a^2*b^5 + 7*A*a^4*b^3 + 35*B*a^3*b^4 - 28*B*a^5*b^2 - 2*A*a^6*b - 20*B*a*b^6)*(8*a*b^23 - 8*a^2*b^22 - 48
*a^3*b^21 + 48*a^4*b^20 + 120*a^5*b^19 - 120*a^6*b^18 - 160*a^7*b^17 + 160*a^8*b^16 + 120*a^9*b^15 - 120*a^10*
b^14 - 48*a^11*b^13 + 48*a^12*b^12 + 8*a^13*b^11 - 8*a^14*b^10))/((b^19 - 7*a^2*b^17 + 21*a^4*b^15 - 35*a^6*b^
13 + 35*a^8*b^11 - 21*a^10*b^9 + 7*a^12*b^7 - a^14*b^5)*(a*b^18 + b^19 - 5*a^2*b^17 - 5*a^3*b^16 + 10*a^4*b^15
+ 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5*a^9*b^10 - a^10*b^9 - a^11*b^8)))*(8*A*b^7 + 8*B*a
^7 - 8*A*a^2*b^5 + 7*A*a^4*b^3 + 35*B*a^3*b^4 - 28*B*a^5*b^2 - 2*A*a^6*b - 20*B*a*b^6))/(2*(b^19 - 7*a^2*b^17
+ 21*a^4*b^15 - 35*a^6*b^13 + 35*a^8*b^11 - 21*a^10*b^9 + 7*a^12*b^7 - a^14*b^5)))*((a + b)^7*(a - b)^7)^(1/2)
*(8*A*b^7 + 8*B*a^7 - 8*A*a^2*b^5 + 7*A*a^4*b^3 + 35*B*a^3*b^4 - 28*B*a^5*b^2 - 2*A*a^6*b - 20*B*a*b^6))/(2*(b
^19 - 7*a^2*b^17 + 21*a^4*b^15 - 35*a^6*b^13 + 35*a^8*b^11 - 21*a^10*b^9 + 7*a^12*b^7 - a^14*b^5)) - (a*((8*ta
n(c/2 + (d*x)/2)*(4*A^2*b^16 + 128*B^2*a^16 - 8*A^2*a*b^15 - 128*B^2*a^15*b + 44*A^2*a^2*b^14 + 48*A^2*a^3*b^1
3 - 92*A^2*a^4*b^12 - 120*A^2*a^5*b^11 + 156*A^2*a^6*b^10 + 160*A^2*a^7*b^9 - 164*A^2*a^8*b^8 - 120*A^2*a^9*b^
7 + 117*A^2*a^10*b^6 + 48*A^2*a^11*b^5 - 48*A^2*a^12*b^4 - 8*A^2*a^13*b^3 + 8*A^2*a^14*b^2 + 64*B^2*a^2*b^14 -
128*B^2*a^3*b^13 + 80*B^2*a^4*b^12 + 768*B^2*a^5*b^11 - 824*B^2*a^6*b^10 - 1920*B^2*a^7*b^9 + 2025*B^2*a^8*b^
8 + 2560*B^2*a^9*b^7 - 2600*B^2*a^10*b^6 - 1920*B^2*a^11*b^5 + 1920*B^2*a^12*b^4 + 768*B^2*a^13*b^3 - 768*B^2*
a^14*b^2 - 32*A*B*a*b^15 - 64*A*B*a^15*b + 64*A*B*a^2*b^14 - 160*A*B*a^3*b^13 - 384*A*B*a^4*b^12 + 592*A*B*a^5
*b^11 + 960*A*B*a^6*b^10 - 1128*A*B*a^7*b^9 - 1280*A*B*a^8*b^8 + 1306*A*B*a^9*b^7 + 960*A*B*a^10*b^6 - 948*A*B
*a^11*b^5 - 384*A*B*a^12*b^4 + 384*A*B*a^13*b^3 + 64*A*B*a^14*b^2))/(a*b^18 + b^19 - 5*a^2*b^17 - 5*a^3*b^16 +
10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5*a^9*b^10 - a^10*b^9 - a^11*b^8) + (a*(
(a + b)^7*(a - b)^7)^(1/2)*((8*(4*A*b^24 - 12*A*a^2*b^22 + 64*A*a^3*b^21 + 20*A*a^4*b^20 - 110*A*a^5*b^19 - 30
*A*a^6*b^18 + 110*A*a^7*b^17 + 30*A*a^8*b^16 - 70*A*a^9*b^15 - 14*A*a^10*b^14 + 26*A*a^11*b^13 + 2*A*a^12*b^12
- 4*A*a^13*b^11 + 40*B*a^2*b^22 + 72*B*a^3*b^21 - 190*B*a^4*b^20 - 146*B*a^5*b^19 + 386*B*a^6*b^18 + 174*B*a^
7*b^17 - 434*B*a^8*b^16 - 126*B*a^9*b^15 + 286*B*a^10*b^14 + 50*B*a^11*b^13 - 104*B*a^12*b^12 - 8*B*a^13*b^11
+ 16*B*a^14*b^10 - 16*A*a*b^23 - 16*B*a*b^23))/(a*b^22 + b^23 - 5*a^2*b^21 - 5*a^3*b^20 + 10*a^4*b^19 + 10*a^5
*b^18 - 10*a^6*b^17 - 10*a^7*b^16 + 5*a^8*b^15 + 5*a^9*b^14 - a^10*b^13 - a^11*b^12) + (4*a*tan(c/2 + (d*x)/2)
*((a + b)^7*(a - b)^7)^(1/2)*(8*A*b^7 + 8*B*a^7 - 8*A*a^2*b^5 + 7*A*a^4*b^3 + 35*B*a^3*b^4 - 28*B*a^5*b^2 - 2*
A*a^6*b - 20*B*a*b^6)*(8*a*b^23 - 8*a^2*b^22 - 48*a^3*b^21 + 48*a^4*b^20 + 120*a^5*b^19 - 120*a^6*b^18 - 160*a
^7*b^17 + 160*a^8*b^16 + 120*a^9*b^15 - 120*a^10*b^14 - 48*a^11*b^13 + 48*a^12*b^12 + 8*a^13*b^11 - 8*a^14*b^1
0))/((b^19 - 7*a^2*b^17 + 21*a^4*b^15 - 35*a^6*b^13 + 35*a^8*b^11 - 21*a^10*b^9 + 7*a^12*b^7 - a^14*b^5)*(a*b^
18 + b^19 - 5*a^2*b^17 - 5*a^3*b^16 + 10*a^4*b^15 + 10*a^5*b^14 - 10*a^6*b^13 - 10*a^7*b^12 + 5*a^8*b^11 + 5*a
^9*b^10 - a^10*b^9 - a^11*b^8)))*(8*A*b^7 + 8*B*a^7 - 8*A*a^2*b^5 + 7*A*a^4*b^3 + 35*B*a^3*b^4 - 28*B*a^5*b^2
- 2*A*a^6*b - 20*B*a*b^6))/(2*(b^19 - 7*a^2*b^17 + 21*a^4*b^15 - 35*a^6*b^13 + 35*a^8*b^11 - 21*a^10*b^9 + 7*a
^12*b^7 - a^14*b^5)))*((a + b)^7*(a - b)^7)^(1/2)*(8*A*b^7 + 8*B*a^7 - 8*A*a^2*b^5 + 7*A*a^4*b^3 + 35*B*a^3*b^
4 - 28*B*a^5*b^2 - 2*A*a^6*b - 20*B*a*b^6))/(2*(b^19 - 7*a^2*b^17 + 21*a^4*b^15 - 35*a^6*b^13 + 35*a^8*b^11 -
21*a^10*b^9 + 7*a^12*b^7 - a^14*b^5))))*((a + b)^7*(a - b)^7)^(1/2)*(8*A*b^7 + 8*B*a^7 - 8*A*a^2*b^5 + 7*A*a^4
*b^3 + 35*B*a^3*b^4 - 28*B*a^5*b^2 - 2*A*a^6*b - 20*B*a*b^6)*1i)/(d*(b^19 - 7*a^2*b^17 + 21*a^4*b^15 - 35*a^6*
b^13 + 35*a^8*b^11 - 21*a^10*b^9 + 7*a^12*b^7 - a^14*b^5))